package com.yihu.wlyy.entity.doctor.team.admin;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 医生行政团队成员。
 *
 * @author Sand
 */
@Entity
@Table(name = "wlyy_doctor_admin_team_member")
public class AdminTeamMember extends IdEntity {
    private long teamId;
    private long doctorId;
    private Date joinTime;
    private boolean isLeader;

    public long getTeamId() {
        return teamId;
    }

    @Column(name = "team_id")
    public void setTeamId(long teamId) {
        this.teamId = teamId;
    }

    public long getDoctorId() {
        return doctorId;
    }

    @Column(name = "doctor_id")
    public void setDoctorId(long doctorId) {
        this.doctorId = doctorId;
    }

    @JsonFormat(pattern = "yyyy-MM-dd hh:mm", timezone = "GMT+08:00")
    public Date getJoinTime() {
        return joinTime;
    }

    @Column(name = "join_time")
    public void setJoinTime(Date joinTime) {
        this.joinTime = joinTime;
    }

    public boolean isLeader() {
        return isLeader;
    }

    @Column(name = "is_leader")
    public void setLeader(boolean leader) {
        isLeader = leader;
    }
}
